package com.example.testanimation.preferences;

import android.content.Context;
import android.preference.Preference;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

/**
 * Created by scenic on 15-7-27.
 */
public class SelfPrefere extends Preference{
    public SelfPrefere(Context context, AttributeSet attrs) {
        super(context, attrs);
    }
    public SelfPrefere(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }
    public SelfPrefere(Context context) {
        super(context);
    }
    @Override
    protected View onCreateView(ViewGroup parent) {
        TextView txView = new TextView(getContext());
        txView.setText(getTitle());
        txView.setSingleLine(true);
        txView.setTextSize(30);
        txView.setEllipsize(TextUtils.TruncateAt.MIDDLE);
        return txView;
    }
}
